package com.tarena.lbs.user.dao.repository.Impl;

import com.tarena.lbs.base.protocol.model.Result;
import com.tarena.lbs.user.dao.mapper.AdminMapper;
import com.tarena.lbs.user.dao.repository.AdminRepository;
import com.tarena.lbs.user.pojo.param.AdminLoginParam;
import com.tarena.lbs.user.pojo.po.AdminPO;
import com.tarena.lbs.user.pojo.vo.LoginVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
@Slf4j
public class AdminRepositoryImpl implements AdminRepository {
    @Autowired
    private AdminMapper adminMapper;

//    @Override
//    public Result<LoginVO> select(AdminLoginParam param) {
//        log.debug("仓储层商家登录业务{}" , param);
//        Result<LoginVO> list = adminMapper.select(param);
//        return list;
//    }

    @Override
    public AdminPO login(AdminLoginParam param) {
        AdminPO adminPO =  adminMapper.login(param);
        return adminPO;
    }

    @Override
    public AdminPO detail(Integer id) {
        AdminPO adminPO = adminMapper.selectById(id);
        return adminPO;
    }
}
